//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS ChimeSDKMessaging service.
///
/// The Amazon Chime SDK messaging APIs in this section allow software developers to send and receive messages in custom messaging applications. These APIs depend on the frameworks provided by the Amazon Chime SDK identity APIs. For more information about the messaging APIs, see Amazon Chime SDK messaging.
public struct ChimeSDKMessaging: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the ChimeSDKMessaging client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "ChimeSDKMessaging",
            serviceIdentifier: "messaging-chime",
            signingName: "chime",
            serviceProtocol: .restjson,
            apiVersion: "2021-05-15",
            endpoint: endpoint,
            variantEndpoints: Self.variantEndpoints,
            errorType: ChimeSDKMessagingErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }




    /// FIPS and dualstack endpoints
    static var variantEndpoints: [EndpointVariantType: AWSServiceConfig.EndpointVariant] {[
        [.fips]: .init(endpoints: [
            "us-east-1": "messaging-chime-fips.us-east-1.amazonaws.com"
        ])
    ]}

    // MARK: API Calls

    /// Associates a channel flow with a channel. Once associated, all messages to that channel go through channel flow processors. To stop processing, use the  DisassociateChannelFlow API.  Only administrators or channel moderators can associate a channel flow. The  x-amz-chime-bearer request header is mandatory. Use the ARN of the  AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func associateChannelFlow(_ input: AssociateChannelFlowRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "AssociateChannelFlow", 
            path: "/channels/{ChannelArn}/channel-flow", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Associates a channel flow with a channel. Once associated, all messages to that channel go through channel flow processors. To stop processing, use the  DisassociateChannelFlow API.  Only administrators or channel moderators can associate a channel flow. The  x-amz-chime-bearer request header is mandatory. Use the ARN of the  AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - channelFlowArn: The ARN of the channel flow.
    ///   - chimeBearer: The AppInstanceUserArn of the user making the API call.
    ///   - logger: Logger use during operation
    @inlinable
    public func associateChannelFlow(
        channelArn: String,
        channelFlowArn: String,
        chimeBearer: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = AssociateChannelFlowRequest(
            channelArn: channelArn, 
            channelFlowArn: channelFlowArn, 
            chimeBearer: chimeBearer
        )
        return try await self.associateChannelFlow(input, logger: logger)
    }

    /// Adds a specified number of users and bots to a channel.
    @Sendable
    @inlinable
    public func batchCreateChannelMembership(_ input: BatchCreateChannelMembershipRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> BatchCreateChannelMembershipResponse {
        try await self.client.execute(
            operation: "BatchCreateChannelMembership", 
            path: "/channels/{ChannelArn}/memberships?operation=batch-create", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds a specified number of users and bots to a channel.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel to which you're adding users or bots.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - memberArns: The ARNs of the members you want to add to the channel. Only AppInstanceUsers and  AppInstanceBots can be added as a channel member.
    ///   - subChannelId: The ID of the SubChannel in the request.   Only required when creating membership in a SubChannel for a moderator in an elastic channel.
    ///   - type: The membership type of a user, DEFAULT or HIDDEN. Default members are always returned as part of ListChannelMemberships. Hidden members are only returned if the type filter in ListChannelMemberships equals HIDDEN. Otherwise hidden members are not returned. This is only supported by moderators.
    ///   - logger: Logger use during operation
    @inlinable
    public func batchCreateChannelMembership(
        channelArn: String,
        chimeBearer: String,
        memberArns: [String],
        subChannelId: String? = nil,
        type: ChannelMembershipType? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BatchCreateChannelMembershipResponse {
        let input = BatchCreateChannelMembershipRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            memberArns: memberArns, 
            subChannelId: subChannelId, 
            type: type
        )
        return try await self.batchCreateChannelMembership(input, logger: logger)
    }

    /// Calls back Amazon Chime SDK messaging with a processing response message. This should be invoked from the processor Lambda. This is a developer API. You can return one of the following processing responses:   Update message content or metadata   Deny a message   Make no changes to the message
    @Sendable
    @inlinable
    public func channelFlowCallback(_ input: ChannelFlowCallbackRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ChannelFlowCallbackResponse {
        try await self.client.execute(
            operation: "ChannelFlowCallback", 
            path: "/channels/{ChannelArn}?operation=channel-flow-callback", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Calls back Amazon Chime SDK messaging with a processing response message. This should be invoked from the processor Lambda. This is a developer API. You can return one of the following processing responses:   Update message content or metadata   Deny a message   Make no changes to the message
    ///
    /// Parameters:
    ///   - callbackId: The identifier passed to the processor by the service when invoked. Use the identifier to call back the service.
    ///   - channelArn: The ARN of the channel.
    ///   - channelMessage: Stores information about the processed message.
    ///   - deleteResource: When a processor determines that a message needs to be DENIED, pass this parameter with a value of true.
    ///   - logger: Logger use during operation
    @inlinable
    public func channelFlowCallback(
        callbackId: String = ChannelFlowCallbackRequest.idempotencyToken(),
        channelArn: String,
        channelMessage: ChannelMessageCallback,
        deleteResource: Bool? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ChannelFlowCallbackResponse {
        let input = ChannelFlowCallbackRequest(
            callbackId: callbackId, 
            channelArn: channelArn, 
            channelMessage: channelMessage, 
            deleteResource: deleteResource
        )
        return try await self.channelFlowCallback(input, logger: logger)
    }

    /// Creates a channel to which you can add users and send messages.  Restriction: You can't change a channel's privacy.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func createChannel(_ input: CreateChannelRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateChannelResponse {
        try await self.client.execute(
            operation: "CreateChannel", 
            path: "/channels", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a channel to which you can add users and send messages.  Restriction: You can't change a channel's privacy.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the channel request.
    ///   - channelId: The ID of the channel in the request.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.
    ///   - clientRequestToken: The client token for the request. An Idempotency token.
    ///   - elasticChannelConfiguration: The attributes required to configure and create an elastic channel. An elastic channel can support a maximum of 1-million users, excluding moderators.
    ///   - expirationSettings: Settings that control the interval after which the channel is automatically deleted.
    ///   - memberArns: The ARNs of the channel members in the request.
    ///   - metadata: The metadata of the creation request. Limited to 1KB and UTF-8.
    ///   - mode: The channel mode: UNRESTRICTED or RESTRICTED. Administrators, moderators, and channel members can add themselves and other members to unrestricted channels. Only administrators and moderators can add members to restricted channels.
    ///   - moderatorArns: The ARNs of the channel moderators in the request.
    ///   - name: The name of the channel.
    ///   - privacy: The channel's privacy level: PUBLIC or PRIVATE. Private channels aren't discoverable by users outside the channel. Public channels are discoverable by anyone in the AppInstance.
    ///   - tags: The tags for the creation request.
    ///   - logger: Logger use during operation
    @inlinable
    public func createChannel(
        appInstanceArn: String,
        channelId: String? = nil,
        chimeBearer: String,
        clientRequestToken: String = CreateChannelRequest.idempotencyToken(),
        elasticChannelConfiguration: ElasticChannelConfiguration? = nil,
        expirationSettings: ExpirationSettings? = nil,
        memberArns: [String]? = nil,
        metadata: String? = nil,
        mode: ChannelMode? = nil,
        moderatorArns: [String]? = nil,
        name: String,
        privacy: ChannelPrivacy? = nil,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateChannelResponse {
        let input = CreateChannelRequest(
            appInstanceArn: appInstanceArn, 
            channelId: channelId, 
            chimeBearer: chimeBearer, 
            clientRequestToken: clientRequestToken, 
            elasticChannelConfiguration: elasticChannelConfiguration, 
            expirationSettings: expirationSettings, 
            memberArns: memberArns, 
            metadata: metadata, 
            mode: mode, 
            moderatorArns: moderatorArns, 
            name: name, 
            privacy: privacy, 
            tags: tags
        )
        return try await self.createChannel(input, logger: logger)
    }

    /// Permanently bans a member from a channel. Moderators can't add banned members to a channel. To undo a ban, you first have to DeleteChannelBan, and then CreateChannelMembership. Bans are cleaned up when you delete users or channels. If you ban a user who is already part of a channel, that user is automatically kicked from the channel.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func createChannelBan(_ input: CreateChannelBanRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateChannelBanResponse {
        try await self.client.execute(
            operation: "CreateChannelBan", 
            path: "/channels/{ChannelArn}/bans", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Permanently bans a member from a channel. Moderators can't add banned members to a channel. To undo a ban, you first have to DeleteChannelBan, and then CreateChannelMembership. Bans are cleaned up when you delete users or channels. If you ban a user who is already part of a channel, that user is automatically kicked from the channel.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the ban request.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.
    ///   - memberArn: The AppInstanceUserArn of the member being banned.
    ///   - logger: Logger use during operation
    @inlinable
    public func createChannelBan(
        channelArn: String,
        chimeBearer: String,
        memberArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateChannelBanResponse {
        let input = CreateChannelBanRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            memberArn: memberArn
        )
        return try await self.createChannelBan(input, logger: logger)
    }

    /// Creates a channel flow, a container for processors. Processors are AWS Lambda functions that perform actions on chat messages, such as stripping out profanity. You can associate channel flows with channels, and the processors in the channel flow then take action on all messages sent to that channel. This is a developer API. Channel flows process the following items:   New and updated messages   Persistent and non-persistent messages   The Standard message type    Channel flows don't process Control or System messages. For more information about the message types provided by Chime SDK messaging, refer to  Message types in the Amazon Chime developer guide.
    @Sendable
    @inlinable
    public func createChannelFlow(_ input: CreateChannelFlowRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateChannelFlowResponse {
        try await self.client.execute(
            operation: "CreateChannelFlow", 
            path: "/channel-flows", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a channel flow, a container for processors. Processors are AWS Lambda functions that perform actions on chat messages, such as stripping out profanity. You can associate channel flows with channels, and the processors in the channel flow then take action on all messages sent to that channel. This is a developer API. Channel flows process the following items:   New and updated messages   Persistent and non-persistent messages   The Standard message type    Channel flows don't process Control or System messages. For more information about the message types provided by Chime SDK messaging, refer to  Message types in the Amazon Chime developer guide.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the channel flow request.
    ///   - clientRequestToken: The client token for the request. An Idempotency token.
    ///   - name: The name of the channel flow.
    ///   - processors: Information about the processor Lambda functions.
    ///   - tags: The tags for the creation request.
    ///   - logger: Logger use during operation
    @inlinable
    public func createChannelFlow(
        appInstanceArn: String,
        clientRequestToken: String = CreateChannelFlowRequest.idempotencyToken(),
        name: String,
        processors: [Processor],
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateChannelFlowResponse {
        let input = CreateChannelFlowRequest(
            appInstanceArn: appInstanceArn, 
            clientRequestToken: clientRequestToken, 
            name: name, 
            processors: processors, 
            tags: tags
        )
        return try await self.createChannelFlow(input, logger: logger)
    }

    /// Adds a member to a channel. The InvitedBy field in ChannelMembership  is derived from the request header. A channel member can:   List messages   Send messages   Receive messages   Edit their own messages   Leave the channel   Privacy settings impact this action as follows:   Public Channels: You do not need to be a member to list messages, but you must be a member to send messages.   Private Channels: You must be a member to list or send messages.    The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUserArn or AppInstanceBot that makes the API call  as the value in the header.
    @Sendable
    @inlinable
    public func createChannelMembership(_ input: CreateChannelMembershipRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateChannelMembershipResponse {
        try await self.client.execute(
            operation: "CreateChannelMembership", 
            path: "/channels/{ChannelArn}/memberships", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds a member to a channel. The InvitedBy field in ChannelMembership  is derived from the request header. A channel member can:   List messages   Send messages   Receive messages   Edit their own messages   Leave the channel   Privacy settings impact this action as follows:   Public Channels: You do not need to be a member to list messages, but you must be a member to send messages.   Private Channels: You must be a member to list or send messages.    The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUserArn or AppInstanceBot that makes the API call  as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel to which you're adding users.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - memberArn: The AppInstanceUserArn of the member you want to add to the channel.
    ///   - subChannelId: The ID of the SubChannel in the request.  Only required when creating membership in a SubChannel for a moderator in an elastic channel.
    ///   - type: The membership type of a user, DEFAULT or HIDDEN. Default members are always returned as part of ListChannelMemberships. Hidden members are only returned if the type filter in ListChannelMemberships equals HIDDEN. Otherwise hidden members are not returned. This is only supported by moderators.
    ///   - logger: Logger use during operation
    @inlinable
    public func createChannelMembership(
        channelArn: String,
        chimeBearer: String,
        memberArn: String,
        subChannelId: String? = nil,
        type: ChannelMembershipType,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateChannelMembershipResponse {
        let input = CreateChannelMembershipRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            memberArn: memberArn, 
            subChannelId: subChannelId, 
            type: type
        )
        return try await self.createChannelMembership(input, logger: logger)
    }

    /// Creates a new ChannelModerator. A channel moderator can:   Add and remove other members of the channel.   Add and remove other moderators of the channel.   Add and remove user bans for the channel.   Redact messages in the channel.   List messages in the channel.    The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBotof the user that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func createChannelModerator(_ input: CreateChannelModeratorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateChannelModeratorResponse {
        try await self.client.execute(
            operation: "CreateChannelModerator", 
            path: "/channels/{ChannelArn}/moderators", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a new ChannelModerator. A channel moderator can:   Add and remove other members of the channel.   Add and remove other moderators of the channel.   Add and remove user bans for the channel.   Redact messages in the channel.   List messages in the channel.    The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBotof the user that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - channelModeratorArn: The AppInstanceUserArn of the moderator.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - logger: Logger use during operation
    @inlinable
    public func createChannelModerator(
        channelArn: String,
        channelModeratorArn: String,
        chimeBearer: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateChannelModeratorResponse {
        let input = CreateChannelModeratorRequest(
            channelArn: channelArn, 
            channelModeratorArn: channelModeratorArn, 
            chimeBearer: chimeBearer
        )
        return try await self.createChannelModerator(input, logger: logger)
    }

    /// Immediately makes a channel and its memberships inaccessible and marks them for deletion. This is an irreversible process.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUserArn or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func deleteChannel(_ input: DeleteChannelRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteChannel", 
            path: "/channels/{ChannelArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Immediately makes a channel and its memberships inaccessible and marks them for deletion. This is an irreversible process.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUserArn or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel being deleted.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteChannel(
        channelArn: String,
        chimeBearer: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteChannelRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer
        )
        return try await self.deleteChannel(input, logger: logger)
    }

    /// Removes a member from a channel's ban list.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func deleteChannelBan(_ input: DeleteChannelBanRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteChannelBan", 
            path: "/channels/{ChannelArn}/bans/{MemberArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes a member from a channel's ban list.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel from which the AppInstanceUser was banned.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot that makes the  API call.
    ///   - memberArn: The ARN of the AppInstanceUser that you want to reinstate.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteChannelBan(
        channelArn: String,
        chimeBearer: String,
        memberArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteChannelBanRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            memberArn: memberArn
        )
        return try await self.deleteChannelBan(input, logger: logger)
    }

    /// Deletes a channel flow, an irreversible process. This is a developer API.  This API works only when the channel flow is not associated with any channel. To get a list of all channels that a channel flow is associated with, use the  ListChannelsAssociatedWithChannelFlow API. Use the DisassociateChannelFlow API to disassociate a channel flow from all channels.
    @Sendable
    @inlinable
    public func deleteChannelFlow(_ input: DeleteChannelFlowRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteChannelFlow", 
            path: "/channel-flows/{ChannelFlowArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a channel flow, an irreversible process. This is a developer API.  This API works only when the channel flow is not associated with any channel. To get a list of all channels that a channel flow is associated with, use the  ListChannelsAssociatedWithChannelFlow API. Use the DisassociateChannelFlow API to disassociate a channel flow from all channels.
    ///
    /// Parameters:
    ///   - channelFlowArn: The ARN of the channel flow.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteChannelFlow(
        channelFlowArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteChannelFlowRequest(
            channelFlowArn: channelFlowArn
        )
        return try await self.deleteChannelFlow(input, logger: logger)
    }

    /// Removes a member from a channel.  The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func deleteChannelMembership(_ input: DeleteChannelMembershipRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteChannelMembership", 
            path: "/channels/{ChannelArn}/memberships/{MemberArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes a member from a channel.  The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel from which you want to remove the user.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot that makes the  API call.
    ///   - memberArn: The AppInstanceUserArn of the member that you're removing from the channel.
    ///   - subChannelId: The ID of the SubChannel in the request.  Only for use by moderators.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteChannelMembership(
        channelArn: String,
        chimeBearer: String,
        memberArn: String,
        subChannelId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteChannelMembershipRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            memberArn: memberArn, 
            subChannelId: subChannelId
        )
        return try await self.deleteChannelMembership(input, logger: logger)
    }

    /// Deletes a channel message. Only admins can perform this action. Deletion makes messages inaccessible immediately. A background process deletes any revisions created by UpdateChannelMessage.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func deleteChannelMessage(_ input: DeleteChannelMessageRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteChannelMessage", 
            path: "/channels/{ChannelArn}/messages/{MessageId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a channel message. Only admins can perform this action. Deletion makes messages inaccessible immediately. A background process deletes any revisions created by UpdateChannelMessage.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot that makes the  API call.
    ///   - messageId: The ID of the message being deleted.
    ///   - subChannelId: The ID of the SubChannel in the request.  Only required when deleting messages in a SubChannel that the user belongs to.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteChannelMessage(
        channelArn: String,
        chimeBearer: String,
        messageId: String,
        subChannelId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteChannelMessageRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            messageId: messageId, 
            subChannelId: subChannelId
        )
        return try await self.deleteChannelMessage(input, logger: logger)
    }

    /// Deletes a channel moderator.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func deleteChannelModerator(_ input: DeleteChannelModeratorRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteChannelModerator", 
            path: "/channels/{ChannelArn}/moderators/{ChannelModeratorArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a channel moderator.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - channelModeratorArn: The AppInstanceUserArn of the moderator being deleted.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot that makes the  API call.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteChannelModerator(
        channelArn: String,
        channelModeratorArn: String,
        chimeBearer: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteChannelModeratorRequest(
            channelArn: channelArn, 
            channelModeratorArn: channelModeratorArn, 
            chimeBearer: chimeBearer
        )
        return try await self.deleteChannelModerator(input, logger: logger)
    }

    /// Deletes the streaming configurations for an AppInstance. For more information, see  Streaming messaging data in the Amazon Chime SDK Developer Guide.
    @Sendable
    @inlinable
    public func deleteMessagingStreamingConfigurations(_ input: DeleteMessagingStreamingConfigurationsRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteMessagingStreamingConfigurations", 
            path: "/app-instances/{AppInstanceArn}/streaming-configurations", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the streaming configurations for an AppInstance. For more information, see  Streaming messaging data in the Amazon Chime SDK Developer Guide.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the streaming configurations being deleted.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteMessagingStreamingConfigurations(
        appInstanceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteMessagingStreamingConfigurationsRequest(
            appInstanceArn: appInstanceArn
        )
        return try await self.deleteMessagingStreamingConfigurations(input, logger: logger)
    }

    /// Returns the full details of a channel in an Amazon Chime AppInstance.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func describeChannel(_ input: DescribeChannelRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeChannelResponse {
        try await self.client.execute(
            operation: "DescribeChannel", 
            path: "/channels/{ChannelArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the full details of a channel in an Amazon Chime AppInstance.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot that makes the  API call.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeChannel(
        channelArn: String,
        chimeBearer: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeChannelResponse {
        let input = DescribeChannelRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer
        )
        return try await self.describeChannel(input, logger: logger)
    }

    /// Returns the full details of a channel ban.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func describeChannelBan(_ input: DescribeChannelBanRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeChannelBanResponse {
        try await self.client.execute(
            operation: "DescribeChannelBan", 
            path: "/channels/{ChannelArn}/bans/{MemberArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the full details of a channel ban.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel from which the user is banned.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot that makes the  API call.
    ///   - memberArn: The AppInstanceUserArn of the member being banned.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeChannelBan(
        channelArn: String,
        chimeBearer: String,
        memberArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeChannelBanResponse {
        let input = DescribeChannelBanRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            memberArn: memberArn
        )
        return try await self.describeChannelBan(input, logger: logger)
    }

    /// Returns the full details of a channel flow in an Amazon Chime AppInstance. This is a developer API.
    @Sendable
    @inlinable
    public func describeChannelFlow(_ input: DescribeChannelFlowRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeChannelFlowResponse {
        try await self.client.execute(
            operation: "DescribeChannelFlow", 
            path: "/channel-flows/{ChannelFlowArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the full details of a channel flow in an Amazon Chime AppInstance. This is a developer API.
    ///
    /// Parameters:
    ///   - channelFlowArn: The ARN of the channel flow.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeChannelFlow(
        channelFlowArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeChannelFlowResponse {
        let input = DescribeChannelFlowRequest(
            channelFlowArn: channelFlowArn
        )
        return try await self.describeChannelFlow(input, logger: logger)
    }

    /// Returns the full details of a user's channel membership.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func describeChannelMembership(_ input: DescribeChannelMembershipRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeChannelMembershipResponse {
        try await self.client.execute(
            operation: "DescribeChannelMembership", 
            path: "/channels/{ChannelArn}/memberships/{MemberArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the full details of a user's channel membership.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot that makes the  API call.
    ///   - memberArn: The AppInstanceUserArn of the member.
    ///   - subChannelId: The ID of the SubChannel in the request. The response contains an ElasticChannelConfiguration object.  Only required to get a user’s SubChannel membership details.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeChannelMembership(
        channelArn: String,
        chimeBearer: String,
        memberArn: String,
        subChannelId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeChannelMembershipResponse {
        let input = DescribeChannelMembershipRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            memberArn: memberArn, 
            subChannelId: subChannelId
        )
        return try await self.describeChannelMembership(input, logger: logger)
    }

    ///  Returns the details of a channel based on the membership of the specified AppInstanceUser or AppInstanceBot.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func describeChannelMembershipForAppInstanceUser(_ input: DescribeChannelMembershipForAppInstanceUserRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeChannelMembershipForAppInstanceUserResponse {
        try await self.client.execute(
            operation: "DescribeChannelMembershipForAppInstanceUser", 
            path: "/channels/{ChannelArn}?scope=app-instance-user-membership", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Returns the details of a channel based on the membership of the specified AppInstanceUser or AppInstanceBot.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - appInstanceUserArn: The ARN of the user or bot in a channel.
    ///   - channelArn: The ARN of the channel to which the user belongs.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeChannelMembershipForAppInstanceUser(
        appInstanceUserArn: String,
        channelArn: String,
        chimeBearer: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeChannelMembershipForAppInstanceUserResponse {
        let input = DescribeChannelMembershipForAppInstanceUserRequest(
            appInstanceUserArn: appInstanceUserArn, 
            channelArn: channelArn, 
            chimeBearer: chimeBearer
        )
        return try await self.describeChannelMembershipForAppInstanceUser(input, logger: logger)
    }

    /// Returns the full details of a channel moderated by the specified AppInstanceUser or AppInstanceBot.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func describeChannelModeratedByAppInstanceUser(_ input: DescribeChannelModeratedByAppInstanceUserRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeChannelModeratedByAppInstanceUserResponse {
        try await self.client.execute(
            operation: "DescribeChannelModeratedByAppInstanceUser", 
            path: "/channels/{ChannelArn}?scope=app-instance-user-moderated-channel", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the full details of a channel moderated by the specified AppInstanceUser or AppInstanceBot.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - appInstanceUserArn: The ARN of the user or bot in the moderated channel.
    ///   - channelArn: The ARN of the moderated channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeChannelModeratedByAppInstanceUser(
        appInstanceUserArn: String,
        channelArn: String,
        chimeBearer: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeChannelModeratedByAppInstanceUserResponse {
        let input = DescribeChannelModeratedByAppInstanceUserRequest(
            appInstanceUserArn: appInstanceUserArn, 
            channelArn: channelArn, 
            chimeBearer: chimeBearer
        )
        return try await self.describeChannelModeratedByAppInstanceUser(input, logger: logger)
    }

    /// Returns the full details of a single ChannelModerator.  The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func describeChannelModerator(_ input: DescribeChannelModeratorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeChannelModeratorResponse {
        try await self.client.execute(
            operation: "DescribeChannelModerator", 
            path: "/channels/{ChannelArn}/moderators/{ChannelModeratorArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the full details of a single ChannelModerator.  The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - channelModeratorArn: The AppInstanceUserArn of the channel moderator.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeChannelModerator(
        channelArn: String,
        channelModeratorArn: String,
        chimeBearer: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeChannelModeratorResponse {
        let input = DescribeChannelModeratorRequest(
            channelArn: channelArn, 
            channelModeratorArn: channelModeratorArn, 
            chimeBearer: chimeBearer
        )
        return try await self.describeChannelModerator(input, logger: logger)
    }

    /// Disassociates a channel flow from all its channels. Once disassociated, all messages to that channel stop going through the channel flow processor.  Only administrators or channel moderators can disassociate a channel flow. The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func disassociateChannelFlow(_ input: DisassociateChannelFlowRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DisassociateChannelFlow", 
            path: "/channels/{ChannelArn}/channel-flow/{ChannelFlowArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Disassociates a channel flow from all its channels. Once disassociated, all messages to that channel stop going through the channel flow processor.  Only administrators or channel moderators can disassociate a channel flow. The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - channelFlowArn: The ARN of the channel flow.
    ///   - chimeBearer: The AppInstanceUserArn of the user making the API call.
    ///   - logger: Logger use during operation
    @inlinable
    public func disassociateChannelFlow(
        channelArn: String,
        channelFlowArn: String,
        chimeBearer: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DisassociateChannelFlowRequest(
            channelArn: channelArn, 
            channelFlowArn: channelFlowArn, 
            chimeBearer: chimeBearer
        )
        return try await self.disassociateChannelFlow(input, logger: logger)
    }

    /// Gets the membership preferences of an AppInstanceUser or AppInstanceBot  for the specified channel. A user or a bot must be a member of the channel and own the membership in order to retrieve membership preferences.  Users or bots in the AppInstanceAdmin and channel moderator roles can't  retrieve preferences for other users or bots. Banned users or bots can't retrieve membership preferences for the  channel from which they are banned.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func getChannelMembershipPreferences(_ input: GetChannelMembershipPreferencesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetChannelMembershipPreferencesResponse {
        try await self.client.execute(
            operation: "GetChannelMembershipPreferences", 
            path: "/channels/{ChannelArn}/memberships/{MemberArn}/preferences", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets the membership preferences of an AppInstanceUser or AppInstanceBot  for the specified channel. A user or a bot must be a member of the channel and own the membership in order to retrieve membership preferences.  Users or bots in the AppInstanceAdmin and channel moderator roles can't  retrieve preferences for other users or bots. Banned users or bots can't retrieve membership preferences for the  channel from which they are banned.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.
    ///   - memberArn: The AppInstanceUserArn of the member retrieving the preferences.
    ///   - logger: Logger use during operation
    @inlinable
    public func getChannelMembershipPreferences(
        channelArn: String,
        chimeBearer: String,
        memberArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetChannelMembershipPreferencesResponse {
        let input = GetChannelMembershipPreferencesRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            memberArn: memberArn
        )
        return try await self.getChannelMembershipPreferences(input, logger: logger)
    }

    /// Gets the full details of a channel message.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func getChannelMessage(_ input: GetChannelMessageRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetChannelMessageResponse {
        try await self.client.execute(
            operation: "GetChannelMessage", 
            path: "/channels/{ChannelArn}/messages/{MessageId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets the full details of a channel message.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - messageId: The ID of the message.
    ///   - subChannelId: The ID of the SubChannel in the request.  Only required when getting messages in a SubChannel that the user belongs to.
    ///   - logger: Logger use during operation
    @inlinable
    public func getChannelMessage(
        channelArn: String,
        chimeBearer: String,
        messageId: String,
        subChannelId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetChannelMessageResponse {
        let input = GetChannelMessageRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            messageId: messageId, 
            subChannelId: subChannelId
        )
        return try await self.getChannelMessage(input, logger: logger)
    }

    /// Gets message status for a specified messageId. Use this API to determine the intermediate status of messages going through channel flow processing. The API provides an alternative to  retrieving message status if the event was not received because a client wasn't connected to a websocket.  Messages can have any one of these statuses.  SENT  Message processed successfully  PENDING  Ongoing processing  FAILED  Processing failed  DENIED  Message denied by the processor      This API does not return statuses for denied messages, because we don't store them once the processor denies them.    Only the message sender can invoke this API.   The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func getChannelMessageStatus(_ input: GetChannelMessageStatusRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetChannelMessageStatusResponse {
        try await self.client.execute(
            operation: "GetChannelMessageStatus", 
            path: "/channels/{ChannelArn}/messages/{MessageId}?scope=message-status", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets message status for a specified messageId. Use this API to determine the intermediate status of messages going through channel flow processing. The API provides an alternative to  retrieving message status if the event was not received because a client wasn't connected to a websocket.  Messages can have any one of these statuses.  SENT  Message processed successfully  PENDING  Ongoing processing  FAILED  Processing failed  DENIED  Message denied by the processor      This API does not return statuses for denied messages, because we don't store them once the processor denies them.    Only the message sender can invoke this API.   The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel
    ///   - chimeBearer: The AppInstanceUserArn of the user making the API call.
    ///   - messageId: The ID of the message.
    ///   - subChannelId: The ID of the SubChannel in the request.  Only required when getting message status in a SubChannel that the user belongs to.
    ///   - logger: Logger use during operation
    @inlinable
    public func getChannelMessageStatus(
        channelArn: String,
        chimeBearer: String,
        messageId: String,
        subChannelId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetChannelMessageStatusResponse {
        let input = GetChannelMessageStatusRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            messageId: messageId, 
            subChannelId: subChannelId
        )
        return try await self.getChannelMessageStatus(input, logger: logger)
    }

    /// The details of the endpoint for the messaging session.
    @Sendable
    @inlinable
    public func getMessagingSessionEndpoint(_ input: GetMessagingSessionEndpointRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetMessagingSessionEndpointResponse {
        try await self.client.execute(
            operation: "GetMessagingSessionEndpoint", 
            path: "/endpoints/messaging-session", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// The details of the endpoint for the messaging session.
    ///
    /// Parameters:
    ///   - logger: Logger use during operation
    @inlinable
    public func getMessagingSessionEndpoint(
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetMessagingSessionEndpointResponse {
        let input = GetMessagingSessionEndpointRequest(
        )
        return try await self.getMessagingSessionEndpoint(input, logger: logger)
    }

    /// Retrieves the data streaming configuration for an AppInstance. For more information, see  Streaming messaging data in the Amazon Chime SDK Developer Guide.
    @Sendable
    @inlinable
    public func getMessagingStreamingConfigurations(_ input: GetMessagingStreamingConfigurationsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetMessagingStreamingConfigurationsResponse {
        try await self.client.execute(
            operation: "GetMessagingStreamingConfigurations", 
            path: "/app-instances/{AppInstanceArn}/streaming-configurations", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the data streaming configuration for an AppInstance. For more information, see  Streaming messaging data in the Amazon Chime SDK Developer Guide.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the streaming configurations.
    ///   - logger: Logger use during operation
    @inlinable
    public func getMessagingStreamingConfigurations(
        appInstanceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetMessagingStreamingConfigurationsResponse {
        let input = GetMessagingStreamingConfigurationsRequest(
            appInstanceArn: appInstanceArn
        )
        return try await self.getMessagingStreamingConfigurations(input, logger: logger)
    }

    /// Lists all the users and bots banned from a particular channel.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func listChannelBans(_ input: ListChannelBansRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListChannelBansResponse {
        try await self.client.execute(
            operation: "ListChannelBans", 
            path: "/channels/{ChannelArn}/bans", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all the users and bots banned from a particular channel.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - maxResults: The maximum number of bans that you want returned.
    ///   - nextToken: The token passed by previous API calls until all requested bans are returned.
    ///   - logger: Logger use during operation
    @inlinable
    public func listChannelBans(
        channelArn: String,
        chimeBearer: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListChannelBansResponse {
        let input = ListChannelBansRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listChannelBans(input, logger: logger)
    }

    /// Returns a paginated lists of all the channel flows created under a single Chime. This is a developer API.
    @Sendable
    @inlinable
    public func listChannelFlows(_ input: ListChannelFlowsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListChannelFlowsResponse {
        try await self.client.execute(
            operation: "ListChannelFlows", 
            path: "/channel-flows", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a paginated lists of all the channel flows created under a single Chime. This is a developer API.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the app instance.
    ///   - maxResults: The maximum number of channel flows that you want to return.
    ///   - nextToken: The token passed by previous API calls until all requested channel flows are returned.
    ///   - logger: Logger use during operation
    @inlinable
    public func listChannelFlows(
        appInstanceArn: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListChannelFlowsResponse {
        let input = ListChannelFlowsRequest(
            appInstanceArn: appInstanceArn, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listChannelFlows(input, logger: logger)
    }

    /// Lists all channel memberships in a channel.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.  If you want to list the channels to which a specific app instance user belongs, see the  ListChannelMembershipsForAppInstanceUser API.
    @Sendable
    @inlinable
    public func listChannelMemberships(_ input: ListChannelMembershipsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListChannelMembershipsResponse {
        try await self.client.execute(
            operation: "ListChannelMemberships", 
            path: "/channels/{ChannelArn}/memberships", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all channel memberships in a channel.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.  If you want to list the channels to which a specific app instance user belongs, see the  ListChannelMembershipsForAppInstanceUser API.
    ///
    /// Parameters:
    ///   - channelArn: The maximum number of channel memberships that you want returned.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - maxResults: The maximum number of channel memberships that you want returned.
    ///   - nextToken: The token passed by previous API calls until all requested channel memberships are returned.
    ///   - subChannelId: The ID of the SubChannel in the request.  Only required when listing a user's memberships in a particular sub-channel of an elastic channel.
    ///   - type: The membership type of a user, DEFAULT or HIDDEN. Default members are returned as part of ListChannelMemberships if no type is specified. Hidden members are only returned if the type filter in ListChannelMemberships equals HIDDEN.
    ///   - logger: Logger use during operation
    @inlinable
    public func listChannelMemberships(
        channelArn: String,
        chimeBearer: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        subChannelId: String? = nil,
        type: ChannelMembershipType? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListChannelMembershipsResponse {
        let input = ListChannelMembershipsRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            subChannelId: subChannelId, 
            type: type
        )
        return try await self.listChannelMemberships(input, logger: logger)
    }

    ///  Lists all channels that an AppInstanceUser or AppInstanceBot is a part of.  Only an AppInstanceAdmin can call the API with a user ARN that is not their own.   The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func listChannelMembershipsForAppInstanceUser(_ input: ListChannelMembershipsForAppInstanceUserRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListChannelMembershipsForAppInstanceUserResponse {
        try await self.client.execute(
            operation: "ListChannelMembershipsForAppInstanceUser", 
            path: "/channels?scope=app-instance-user-memberships", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Lists all channels that an AppInstanceUser or AppInstanceBot is a part of.  Only an AppInstanceAdmin can call the API with a user ARN that is not their own.   The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - appInstanceUserArn: The ARN of the user or bot.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - maxResults: The maximum number of users that you want returned.
    ///   - nextToken: The token returned from previous API requests until the number of channel memberships is reached.
    ///   - logger: Logger use during operation
    @inlinable
    public func listChannelMembershipsForAppInstanceUser(
        appInstanceUserArn: String? = nil,
        chimeBearer: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListChannelMembershipsForAppInstanceUserResponse {
        let input = ListChannelMembershipsForAppInstanceUserRequest(
            appInstanceUserArn: appInstanceUserArn, 
            chimeBearer: chimeBearer, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listChannelMembershipsForAppInstanceUser(input, logger: logger)
    }

    /// List all the messages in a channel. Returns a paginated list of ChannelMessages. By default, sorted by creation timestamp in descending order.  Redacted messages appear in the results as empty, since they are only redacted, not deleted. Deleted messages do not appear in the results. This action always returns the latest version of an edited message. Also, the x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func listChannelMessages(_ input: ListChannelMessagesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListChannelMessagesResponse {
        try await self.client.execute(
            operation: "ListChannelMessages", 
            path: "/channels/{ChannelArn}/messages", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// List all the messages in a channel. Returns a paginated list of ChannelMessages. By default, sorted by creation timestamp in descending order.  Redacted messages appear in the results as empty, since they are only redacted, not deleted. Deleted messages do not appear in the results. This action always returns the latest version of an edited message. Also, the x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - maxResults: The maximum number of messages that you want returned.
    ///   - nextToken: The token passed by previous API calls until all requested messages are returned.
    ///   - notAfter: The final or ending time stamp for your requested messages.
    ///   - notBefore: The initial or starting time stamp for your requested messages.
    ///   - sortOrder: The order in which you want messages sorted. Default is Descending, based on time created.
    ///   - subChannelId: The ID of the SubChannel in the request.  Only required when listing the messages in a SubChannel that the user belongs to.
    ///   - logger: Logger use during operation
    @inlinable
    public func listChannelMessages(
        channelArn: String,
        chimeBearer: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        notAfter: Date? = nil,
        notBefore: Date? = nil,
        sortOrder: SortOrder? = nil,
        subChannelId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListChannelMessagesResponse {
        let input = ListChannelMessagesRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            notAfter: notAfter, 
            notBefore: notBefore, 
            sortOrder: sortOrder, 
            subChannelId: subChannelId
        )
        return try await self.listChannelMessages(input, logger: logger)
    }

    /// Lists all the moderators for a channel.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func listChannelModerators(_ input: ListChannelModeratorsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListChannelModeratorsResponse {
        try await self.client.execute(
            operation: "ListChannelModerators", 
            path: "/channels/{ChannelArn}/moderators", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all the moderators for a channel.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - maxResults: The maximum number of moderators that you want returned.
    ///   - nextToken: The token passed by previous API calls until all requested moderators are returned.
    ///   - logger: Logger use during operation
    @inlinable
    public func listChannelModerators(
        channelArn: String,
        chimeBearer: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListChannelModeratorsResponse {
        let input = ListChannelModeratorsRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listChannelModerators(input, logger: logger)
    }

    /// Lists all Channels created under a single Chime App as a paginated list. You can specify filters to narrow results.  Functionality & restrictions    Use privacy = PUBLIC to retrieve all public channels in the account.   Only an AppInstanceAdmin can set privacy = PRIVATE to list the private channels in an account.    The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func listChannels(_ input: ListChannelsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListChannelsResponse {
        try await self.client.execute(
            operation: "ListChannels", 
            path: "/channels", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all Channels created under a single Chime App as a paginated list. You can specify filters to narrow results.  Functionality & restrictions    Use privacy = PUBLIC to retrieve all public channels in the account.   Only an AppInstanceAdmin can set privacy = PRIVATE to list the private channels in an account.    The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the AppInstance.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - maxResults: The maximum number of channels that you want to return.
    ///   - nextToken: The token passed by previous API calls until all requested channels are returned.
    ///   - privacy: The privacy setting. PUBLIC retrieves all the public channels. PRIVATE retrieves private channels. Only an AppInstanceAdmin can retrieve private channels.
    ///   - logger: Logger use during operation
    @inlinable
    public func listChannels(
        appInstanceArn: String,
        chimeBearer: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        privacy: ChannelPrivacy? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListChannelsResponse {
        let input = ListChannelsRequest(
            appInstanceArn: appInstanceArn, 
            chimeBearer: chimeBearer, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            privacy: privacy
        )
        return try await self.listChannels(input, logger: logger)
    }

    /// Lists all channels associated with a specified channel flow. You can associate a channel flow with multiple channels, but you can only associate a channel with one channel flow. This is a developer API.
    @Sendable
    @inlinable
    public func listChannelsAssociatedWithChannelFlow(_ input: ListChannelsAssociatedWithChannelFlowRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListChannelsAssociatedWithChannelFlowResponse {
        try await self.client.execute(
            operation: "ListChannelsAssociatedWithChannelFlow", 
            path: "/channels?scope=channel-flow-associations", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all channels associated with a specified channel flow. You can associate a channel flow with multiple channels, but you can only associate a channel with one channel flow. This is a developer API.
    ///
    /// Parameters:
    ///   - channelFlowArn: The ARN of the channel flow.
    ///   - maxResults: The maximum number of channels that you want to return.
    ///   - nextToken: The token passed by previous API calls until all requested channels are returned.
    ///   - logger: Logger use during operation
    @inlinable
    public func listChannelsAssociatedWithChannelFlow(
        channelFlowArn: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListChannelsAssociatedWithChannelFlowResponse {
        let input = ListChannelsAssociatedWithChannelFlowRequest(
            channelFlowArn: channelFlowArn, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listChannelsAssociatedWithChannelFlow(input, logger: logger)
    }

    /// A list of the channels moderated by an AppInstanceUser.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func listChannelsModeratedByAppInstanceUser(_ input: ListChannelsModeratedByAppInstanceUserRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListChannelsModeratedByAppInstanceUserResponse {
        try await self.client.execute(
            operation: "ListChannelsModeratedByAppInstanceUser", 
            path: "/channels?scope=app-instance-user-moderated-channels", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// A list of the channels moderated by an AppInstanceUser.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - appInstanceUserArn: The ARN of the user or bot in the moderated channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - maxResults: The maximum number of channels in the request.
    ///   - nextToken: The token returned from previous API requests until the number of channels moderated by the user is reached.
    ///   - logger: Logger use during operation
    @inlinable
    public func listChannelsModeratedByAppInstanceUser(
        appInstanceUserArn: String? = nil,
        chimeBearer: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListChannelsModeratedByAppInstanceUserResponse {
        let input = ListChannelsModeratedByAppInstanceUserRequest(
            appInstanceUserArn: appInstanceUserArn, 
            chimeBearer: chimeBearer, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listChannelsModeratedByAppInstanceUser(input, logger: logger)
    }

    /// Lists all the SubChannels in an elastic channel when given a channel ID. Available only to the app instance admins and channel moderators of elastic channels.
    @Sendable
    @inlinable
    public func listSubChannels(_ input: ListSubChannelsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListSubChannelsResponse {
        try await self.client.execute(
            operation: "ListSubChannels", 
            path: "/channels/{ChannelArn}/subchannels", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all the SubChannels in an elastic channel when given a channel ID. Available only to the app instance admins and channel moderators of elastic channels.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of elastic channel.
    ///   - chimeBearer: The AppInstanceUserArn of the user making the API call.
    ///   - maxResults: The maximum number of sub-channels that you want to return.
    ///   - nextToken: The token passed by previous API calls until all requested sub-channels are returned.
    ///   - logger: Logger use during operation
    @inlinable
    public func listSubChannels(
        channelArn: String,
        chimeBearer: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListSubChannelsResponse {
        let input = ListSubChannelsRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listSubChannels(input, logger: logger)
    }

    /// Lists the tags applied to an Amazon Chime SDK messaging resource.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/tags", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the tags applied to an Amazon Chime SDK messaging resource.
    ///
    /// Parameters:
    ///   - resourceARN: The ARN of the resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceARN: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceARN: resourceARN
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Sets the number of days before the channel is automatically deleted.    A background process deletes expired channels within 6 hours of expiration.  Actual deletion times may vary.   Expired channels that have not yet been deleted appear as active, and you can update  their expiration settings. The system honors the new settings.   The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func putChannelExpirationSettings(_ input: PutChannelExpirationSettingsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutChannelExpirationSettingsResponse {
        try await self.client.execute(
            operation: "PutChannelExpirationSettings", 
            path: "/channels/{ChannelArn}/expiration-settings", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Sets the number of days before the channel is automatically deleted.    A background process deletes expired channels within 6 hours of expiration.  Actual deletion times may vary.   Expired channels that have not yet been deleted appear as active, and you can update  their expiration settings. The system honors the new settings.   The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.
    ///   - expirationSettings: Settings that control the interval after which a channel is deleted.
    ///   - logger: Logger use during operation
    @inlinable
    public func putChannelExpirationSettings(
        channelArn: String,
        chimeBearer: String? = nil,
        expirationSettings: ExpirationSettings? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutChannelExpirationSettingsResponse {
        let input = PutChannelExpirationSettingsRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            expirationSettings: expirationSettings
        )
        return try await self.putChannelExpirationSettings(input, logger: logger)
    }

    /// Sets the membership preferences of an AppInstanceUser or AppInstanceBot  for the specified channel. The user or bot must be a member of the channel. Only the user or bot who owns the  membership can set preferences. Users or bots in the AppInstanceAdmin and channel moderator roles can't set  preferences for other users. Banned users or bots can't set membership preferences for the channel from  which they are banned.  The x-amz-chime-bearer request header is mandatory. Use the ARN of an  AppInstanceUser or AppInstanceBot that makes the API call as the value in the  header.
    @Sendable
    @inlinable
    public func putChannelMembershipPreferences(_ input: PutChannelMembershipPreferencesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutChannelMembershipPreferencesResponse {
        try await self.client.execute(
            operation: "PutChannelMembershipPreferences", 
            path: "/channels/{ChannelArn}/memberships/{MemberArn}/preferences", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Sets the membership preferences of an AppInstanceUser or AppInstanceBot  for the specified channel. The user or bot must be a member of the channel. Only the user or bot who owns the  membership can set preferences. Users or bots in the AppInstanceAdmin and channel moderator roles can't set  preferences for other users. Banned users or bots can't set membership preferences for the channel from  which they are banned.  The x-amz-chime-bearer request header is mandatory. Use the ARN of an  AppInstanceUser or AppInstanceBot that makes the API call as the value in the  header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.
    ///   - memberArn: The ARN of the member setting the preferences.
    ///   - preferences: The channel membership preferences of an AppInstanceUser .
    ///   - logger: Logger use during operation
    @inlinable
    public func putChannelMembershipPreferences(
        channelArn: String,
        chimeBearer: String,
        memberArn: String,
        preferences: ChannelMembershipPreferences,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutChannelMembershipPreferencesResponse {
        let input = PutChannelMembershipPreferencesRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            memberArn: memberArn, 
            preferences: preferences
        )
        return try await self.putChannelMembershipPreferences(input, logger: logger)
    }

    /// Sets the data streaming configuration for an AppInstance. For more information, see  Streaming messaging data in the Amazon Chime SDK Developer Guide.
    @Sendable
    @inlinable
    public func putMessagingStreamingConfigurations(_ input: PutMessagingStreamingConfigurationsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutMessagingStreamingConfigurationsResponse {
        try await self.client.execute(
            operation: "PutMessagingStreamingConfigurations", 
            path: "/app-instances/{AppInstanceArn}/streaming-configurations", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Sets the data streaming configuration for an AppInstance. For more information, see  Streaming messaging data in the Amazon Chime SDK Developer Guide.
    ///
    /// Parameters:
    ///   - appInstanceArn: The ARN of the streaming configuration.
    ///   - streamingConfigurations: The streaming configurations.
    ///   - logger: Logger use during operation
    @inlinable
    public func putMessagingStreamingConfigurations(
        appInstanceArn: String,
        streamingConfigurations: [StreamingConfiguration],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutMessagingStreamingConfigurationsResponse {
        let input = PutMessagingStreamingConfigurationsRequest(
            appInstanceArn: appInstanceArn, 
            streamingConfigurations: streamingConfigurations
        )
        return try await self.putMessagingStreamingConfigurations(input, logger: logger)
    }

    /// Redacts message content, but not metadata. The message exists in the back end, but the action returns null content, and the state shows as redacted.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func redactChannelMessage(_ input: RedactChannelMessageRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> RedactChannelMessageResponse {
        try await self.client.execute(
            operation: "RedactChannelMessage", 
            path: "/channels/{ChannelArn}/messages/{MessageId}?operation=redact", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Redacts message content, but not metadata. The message exists in the back end, but the action returns null content, and the state shows as redacted.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel containing the messages that you want to redact.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - messageId: The ID of the message being redacted.
    ///   - subChannelId: The ID of the SubChannel in the request.
    ///   - logger: Logger use during operation
    @inlinable
    public func redactChannelMessage(
        channelArn: String,
        chimeBearer: String,
        messageId: String,
        subChannelId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> RedactChannelMessageResponse {
        let input = RedactChannelMessageRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            messageId: messageId, 
            subChannelId: subChannelId
        )
        return try await self.redactChannelMessage(input, logger: logger)
    }

    /// Allows the ChimeBearer to search channels by channel members. Users or bots can search  across the channels that they belong to. Users in the AppInstanceAdmin role can search across  all channels. The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func searchChannels(_ input: SearchChannelsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> SearchChannelsResponse {
        try await self.client.execute(
            operation: "SearchChannels", 
            path: "/channels?operation=search", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Allows the ChimeBearer to search channels by channel members. Users or bots can search  across the channels that they belong to. Users in the AppInstanceAdmin role can search across  all channels. The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - chimeBearer: The AppInstanceUserArn of the user making the API call.
    ///   - fields: A list of the Field objects in the channel being searched.
    ///   - maxResults: The maximum number of channels that you want returned.
    ///   - nextToken: The token returned from previous API requests until the number of channels is reached.
    ///   - logger: Logger use during operation
    @inlinable
    public func searchChannels(
        chimeBearer: String? = nil,
        fields: [SearchField],
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> SearchChannelsResponse {
        let input = SearchChannelsRequest(
            chimeBearer: chimeBearer, 
            fields: fields, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.searchChannels(input, logger: logger)
    }

    /// Sends a message to a particular channel that the member is a part of.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header. Also, STANDARD messages can be up to 4KB in size and contain metadata. Metadata is arbitrary,  and you can use it in a variety of ways, such as containing a link to an attachment.  CONTROL messages are limited to 30 bytes and do not contain metadata.
    @Sendable
    @inlinable
    public func sendChannelMessage(_ input: SendChannelMessageRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> SendChannelMessageResponse {
        try await self.client.execute(
            operation: "SendChannelMessage", 
            path: "/channels/{ChannelArn}/messages", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Sends a message to a particular channel that the member is a part of.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header. Also, STANDARD messages can be up to 4KB in size and contain metadata. Metadata is arbitrary,  and you can use it in a variety of ways, such as containing a link to an attachment.  CONTROL messages are limited to 30 bytes and do not contain metadata.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - clientRequestToken: The Idempotency token for each client request.
    ///   - content: The content of the channel message.
    ///   - contentType: The content type of the channel message.
    ///   - messageAttributes: The attributes for the message, used for message filtering along with a FilterRule defined in the PushNotificationPreferences.
    ///   - metadata: The optional metadata for each message.
    ///   - persistence: Boolean that controls whether the message is persisted on the back end. Required.
    ///   - pushNotification: The push notification configuration of the message.
    ///   - subChannelId: The ID of the SubChannel in the request.
    ///   - target: The target of a message. Must be a member of the channel, such as another user, a bot, or the sender. Only the target and the sender can view targeted messages. Only users who can see targeted messages can take actions on them. However, administrators can delete targeted messages that they can’t see.
    ///   - type: The type of message, STANDARD or CONTROL.  STANDARD messages can be up to 4KB in size and contain metadata. Metadata is arbitrary,  and you can use it in a variety of ways, such as containing a link to an attachment.  CONTROL messages are limited to 30 bytes and do not contain metadata.
    ///   - logger: Logger use during operation
    @inlinable
    public func sendChannelMessage(
        channelArn: String,
        chimeBearer: String,
        clientRequestToken: String = SendChannelMessageRequest.idempotencyToken(),
        content: String,
        contentType: String? = nil,
        messageAttributes: [String: MessageAttributeValue]? = nil,
        metadata: String? = nil,
        persistence: ChannelMessagePersistenceType,
        pushNotification: PushNotificationConfiguration? = nil,
        subChannelId: String? = nil,
        target: [Target]? = nil,
        type: ChannelMessageType,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> SendChannelMessageResponse {
        let input = SendChannelMessageRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            clientRequestToken: clientRequestToken, 
            content: content, 
            contentType: contentType, 
            messageAttributes: messageAttributes, 
            metadata: metadata, 
            persistence: persistence, 
            pushNotification: pushNotification, 
            subChannelId: subChannelId, 
            target: target, 
            type: type
        )
        return try await self.sendChannelMessage(input, logger: logger)
    }

    /// Applies the specified tags to the specified Amazon Chime SDK messaging resource.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/tags?operation=tag-resource", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Applies the specified tags to the specified Amazon Chime SDK messaging resource.
    ///
    /// Parameters:
    ///   - resourceARN: The resource ARN.
    ///   - tags: The tag key-value pairs.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceARN: String,
        tags: [Tag],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = TagResourceRequest(
            resourceARN: resourceARN, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes the specified tags from the specified Amazon Chime SDK messaging resource.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/tags?operation=untag-resource", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes the specified tags from the specified Amazon Chime SDK messaging resource.
    ///
    /// Parameters:
    ///   - resourceARN: The resource ARN.
    ///   - tagKeys: The tag keys.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceARN: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = UntagResourceRequest(
            resourceARN: resourceARN, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Update a channel's attributes.  Restriction: You can't change a channel's privacy.   The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func updateChannel(_ input: UpdateChannelRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateChannelResponse {
        try await self.client.execute(
            operation: "UpdateChannel", 
            path: "/channels/{ChannelArn}", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Update a channel's attributes.  Restriction: You can't change a channel's privacy.   The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - metadata: The metadata for the update request.
    ///   - mode: The mode of the update request.
    ///   - name: The name of the channel.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateChannel(
        channelArn: String,
        chimeBearer: String,
        metadata: String? = nil,
        mode: ChannelMode? = nil,
        name: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateChannelResponse {
        let input = UpdateChannelRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            metadata: metadata, 
            mode: mode, 
            name: name
        )
        return try await self.updateChannel(input, logger: logger)
    }

    /// Updates channel flow attributes. This is a developer API.
    @Sendable
    @inlinable
    public func updateChannelFlow(_ input: UpdateChannelFlowRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateChannelFlowResponse {
        try await self.client.execute(
            operation: "UpdateChannelFlow", 
            path: "/channel-flows/{ChannelFlowArn}", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates channel flow attributes. This is a developer API.
    ///
    /// Parameters:
    ///   - channelFlowArn: The ARN of the channel flow.
    ///   - name: The name of the channel flow.
    ///   - processors: Information about the processor Lambda functions
    ///   - logger: Logger use during operation
    @inlinable
    public func updateChannelFlow(
        channelFlowArn: String,
        name: String,
        processors: [Processor],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateChannelFlowResponse {
        let input = UpdateChannelFlowRequest(
            channelFlowArn: channelFlowArn, 
            name: name, 
            processors: processors
        )
        return try await self.updateChannelFlow(input, logger: logger)
    }

    /// Updates the content of a message.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func updateChannelMessage(_ input: UpdateChannelMessageRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateChannelMessageResponse {
        try await self.client.execute(
            operation: "UpdateChannelMessage", 
            path: "/channels/{ChannelArn}/messages/{MessageId}", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the content of a message.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - content: The content of the channel message.
    ///   - contentType: The content type of the channel message.
    ///   - messageId: The ID string of the message being updated.
    ///   - metadata: The metadata of the message being updated.
    ///   - subChannelId: The ID of the SubChannel in the request.  Only required when updating messages in a SubChannel that the user belongs to.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateChannelMessage(
        channelArn: String,
        chimeBearer: String,
        content: String,
        contentType: String? = nil,
        messageId: String,
        metadata: String? = nil,
        subChannelId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateChannelMessageResponse {
        let input = UpdateChannelMessageRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            content: content, 
            contentType: contentType, 
            messageId: messageId, 
            metadata: metadata, 
            subChannelId: subChannelId
        )
        return try await self.updateChannelMessage(input, logger: logger)
    }

    /// The details of the time when a user last read messages in a channel.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    @Sendable
    @inlinable
    public func updateChannelReadMarker(_ input: UpdateChannelReadMarkerRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateChannelReadMarkerResponse {
        try await self.client.execute(
            operation: "UpdateChannelReadMarker", 
            path: "/channels/{ChannelArn}/readMarker", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// The details of the time when a user last read messages in a channel.  The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
    ///
    /// Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateChannelReadMarker(
        channelArn: String,
        chimeBearer: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateChannelReadMarkerResponse {
        let input = UpdateChannelReadMarkerRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer
        )
        return try await self.updateChannelReadMarker(input, logger: logger)
    }
}

extension ChimeSDKMessaging {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: ChimeSDKMessaging, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension ChimeSDKMessaging {
    /// Return PaginatorSequence for operation ``listChannelBans(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelBansPaginator(
        _ input: ListChannelBansRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListChannelBansRequest, ListChannelBansResponse> {
        return .init(
            input: input,
            command: self.listChannelBans,
            inputKey: \ListChannelBansRequest.nextToken,
            outputKey: \ListChannelBansResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listChannelBans(_:logger:)``.
    ///
    /// - Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - maxResults: The maximum number of bans that you want returned.
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelBansPaginator(
        channelArn: String,
        chimeBearer: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListChannelBansRequest, ListChannelBansResponse> {
        let input = ListChannelBansRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            maxResults: maxResults
        )
        return self.listChannelBansPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listChannelFlows(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelFlowsPaginator(
        _ input: ListChannelFlowsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListChannelFlowsRequest, ListChannelFlowsResponse> {
        return .init(
            input: input,
            command: self.listChannelFlows,
            inputKey: \ListChannelFlowsRequest.nextToken,
            outputKey: \ListChannelFlowsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listChannelFlows(_:logger:)``.
    ///
    /// - Parameters:
    ///   - appInstanceArn: The ARN of the app instance.
    ///   - maxResults: The maximum number of channel flows that you want to return.
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelFlowsPaginator(
        appInstanceArn: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListChannelFlowsRequest, ListChannelFlowsResponse> {
        let input = ListChannelFlowsRequest(
            appInstanceArn: appInstanceArn, 
            maxResults: maxResults
        )
        return self.listChannelFlowsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listChannelMemberships(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelMembershipsPaginator(
        _ input: ListChannelMembershipsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListChannelMembershipsRequest, ListChannelMembershipsResponse> {
        return .init(
            input: input,
            command: self.listChannelMemberships,
            inputKey: \ListChannelMembershipsRequest.nextToken,
            outputKey: \ListChannelMembershipsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listChannelMemberships(_:logger:)``.
    ///
    /// - Parameters:
    ///   - channelArn: The maximum number of channel memberships that you want returned.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - maxResults: The maximum number of channel memberships that you want returned.
    ///   - subChannelId: The ID of the SubChannel in the request.  Only required when listing a user's memberships in a particular sub-channel of an elastic channel.
    ///   - type: The membership type of a user, DEFAULT or HIDDEN. Default members are returned as part of ListChannelMemberships if no type is specified. Hidden members are only returned if the type filter in ListChannelMemberships equals HIDDEN.
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelMembershipsPaginator(
        channelArn: String,
        chimeBearer: String,
        maxResults: Int? = nil,
        subChannelId: String? = nil,
        type: ChannelMembershipType? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListChannelMembershipsRequest, ListChannelMembershipsResponse> {
        let input = ListChannelMembershipsRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            maxResults: maxResults, 
            subChannelId: subChannelId, 
            type: type
        )
        return self.listChannelMembershipsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listChannelMembershipsForAppInstanceUser(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelMembershipsForAppInstanceUserPaginator(
        _ input: ListChannelMembershipsForAppInstanceUserRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListChannelMembershipsForAppInstanceUserRequest, ListChannelMembershipsForAppInstanceUserResponse> {
        return .init(
            input: input,
            command: self.listChannelMembershipsForAppInstanceUser,
            inputKey: \ListChannelMembershipsForAppInstanceUserRequest.nextToken,
            outputKey: \ListChannelMembershipsForAppInstanceUserResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listChannelMembershipsForAppInstanceUser(_:logger:)``.
    ///
    /// - Parameters:
    ///   - appInstanceUserArn: The ARN of the user or bot.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - maxResults: The maximum number of users that you want returned.
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelMembershipsForAppInstanceUserPaginator(
        appInstanceUserArn: String? = nil,
        chimeBearer: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListChannelMembershipsForAppInstanceUserRequest, ListChannelMembershipsForAppInstanceUserResponse> {
        let input = ListChannelMembershipsForAppInstanceUserRequest(
            appInstanceUserArn: appInstanceUserArn, 
            chimeBearer: chimeBearer, 
            maxResults: maxResults
        )
        return self.listChannelMembershipsForAppInstanceUserPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listChannelMessages(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelMessagesPaginator(
        _ input: ListChannelMessagesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListChannelMessagesRequest, ListChannelMessagesResponse> {
        return .init(
            input: input,
            command: self.listChannelMessages,
            inputKey: \ListChannelMessagesRequest.nextToken,
            outputKey: \ListChannelMessagesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listChannelMessages(_:logger:)``.
    ///
    /// - Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - maxResults: The maximum number of messages that you want returned.
    ///   - notAfter: The final or ending time stamp for your requested messages.
    ///   - notBefore: The initial or starting time stamp for your requested messages.
    ///   - sortOrder: The order in which you want messages sorted. Default is Descending, based on time created.
    ///   - subChannelId: The ID of the SubChannel in the request.  Only required when listing the messages in a SubChannel that the user belongs to.
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelMessagesPaginator(
        channelArn: String,
        chimeBearer: String,
        maxResults: Int? = nil,
        notAfter: Date? = nil,
        notBefore: Date? = nil,
        sortOrder: SortOrder? = nil,
        subChannelId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListChannelMessagesRequest, ListChannelMessagesResponse> {
        let input = ListChannelMessagesRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            maxResults: maxResults, 
            notAfter: notAfter, 
            notBefore: notBefore, 
            sortOrder: sortOrder, 
            subChannelId: subChannelId
        )
        return self.listChannelMessagesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listChannelModerators(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelModeratorsPaginator(
        _ input: ListChannelModeratorsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListChannelModeratorsRequest, ListChannelModeratorsResponse> {
        return .init(
            input: input,
            command: self.listChannelModerators,
            inputKey: \ListChannelModeratorsRequest.nextToken,
            outputKey: \ListChannelModeratorsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listChannelModerators(_:logger:)``.
    ///
    /// - Parameters:
    ///   - channelArn: The ARN of the channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - maxResults: The maximum number of moderators that you want returned.
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelModeratorsPaginator(
        channelArn: String,
        chimeBearer: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListChannelModeratorsRequest, ListChannelModeratorsResponse> {
        let input = ListChannelModeratorsRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            maxResults: maxResults
        )
        return self.listChannelModeratorsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listChannels(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelsPaginator(
        _ input: ListChannelsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListChannelsRequest, ListChannelsResponse> {
        return .init(
            input: input,
            command: self.listChannels,
            inputKey: \ListChannelsRequest.nextToken,
            outputKey: \ListChannelsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listChannels(_:logger:)``.
    ///
    /// - Parameters:
    ///   - appInstanceArn: The ARN of the AppInstance.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - maxResults: The maximum number of channels that you want to return.
    ///   - privacy: The privacy setting. PUBLIC retrieves all the public channels. PRIVATE retrieves private channels. Only an AppInstanceAdmin can retrieve private channels.
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelsPaginator(
        appInstanceArn: String,
        chimeBearer: String,
        maxResults: Int? = nil,
        privacy: ChannelPrivacy? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListChannelsRequest, ListChannelsResponse> {
        let input = ListChannelsRequest(
            appInstanceArn: appInstanceArn, 
            chimeBearer: chimeBearer, 
            maxResults: maxResults, 
            privacy: privacy
        )
        return self.listChannelsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listChannelsAssociatedWithChannelFlow(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelsAssociatedWithChannelFlowPaginator(
        _ input: ListChannelsAssociatedWithChannelFlowRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListChannelsAssociatedWithChannelFlowRequest, ListChannelsAssociatedWithChannelFlowResponse> {
        return .init(
            input: input,
            command: self.listChannelsAssociatedWithChannelFlow,
            inputKey: \ListChannelsAssociatedWithChannelFlowRequest.nextToken,
            outputKey: \ListChannelsAssociatedWithChannelFlowResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listChannelsAssociatedWithChannelFlow(_:logger:)``.
    ///
    /// - Parameters:
    ///   - channelFlowArn: The ARN of the channel flow.
    ///   - maxResults: The maximum number of channels that you want to return.
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelsAssociatedWithChannelFlowPaginator(
        channelFlowArn: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListChannelsAssociatedWithChannelFlowRequest, ListChannelsAssociatedWithChannelFlowResponse> {
        let input = ListChannelsAssociatedWithChannelFlowRequest(
            channelFlowArn: channelFlowArn, 
            maxResults: maxResults
        )
        return self.listChannelsAssociatedWithChannelFlowPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listChannelsModeratedByAppInstanceUser(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelsModeratedByAppInstanceUserPaginator(
        _ input: ListChannelsModeratedByAppInstanceUserRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListChannelsModeratedByAppInstanceUserRequest, ListChannelsModeratedByAppInstanceUserResponse> {
        return .init(
            input: input,
            command: self.listChannelsModeratedByAppInstanceUser,
            inputKey: \ListChannelsModeratedByAppInstanceUserRequest.nextToken,
            outputKey: \ListChannelsModeratedByAppInstanceUserResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listChannelsModeratedByAppInstanceUser(_:logger:)``.
    ///
    /// - Parameters:
    ///   - appInstanceUserArn: The ARN of the user or bot in the moderated channel.
    ///   - chimeBearer: The ARN of the AppInstanceUser or AppInstanceBot  that makes the API call.
    ///   - maxResults: The maximum number of channels in the request.
    ///   - logger: Logger used for logging
    @inlinable
    public func listChannelsModeratedByAppInstanceUserPaginator(
        appInstanceUserArn: String? = nil,
        chimeBearer: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListChannelsModeratedByAppInstanceUserRequest, ListChannelsModeratedByAppInstanceUserResponse> {
        let input = ListChannelsModeratedByAppInstanceUserRequest(
            appInstanceUserArn: appInstanceUserArn, 
            chimeBearer: chimeBearer, 
            maxResults: maxResults
        )
        return self.listChannelsModeratedByAppInstanceUserPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listSubChannels(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listSubChannelsPaginator(
        _ input: ListSubChannelsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListSubChannelsRequest, ListSubChannelsResponse> {
        return .init(
            input: input,
            command: self.listSubChannels,
            inputKey: \ListSubChannelsRequest.nextToken,
            outputKey: \ListSubChannelsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listSubChannels(_:logger:)``.
    ///
    /// - Parameters:
    ///   - channelArn: The ARN of elastic channel.
    ///   - chimeBearer: The AppInstanceUserArn of the user making the API call.
    ///   - maxResults: The maximum number of sub-channels that you want to return.
    ///   - logger: Logger used for logging
    @inlinable
    public func listSubChannelsPaginator(
        channelArn: String,
        chimeBearer: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListSubChannelsRequest, ListSubChannelsResponse> {
        let input = ListSubChannelsRequest(
            channelArn: channelArn, 
            chimeBearer: chimeBearer, 
            maxResults: maxResults
        )
        return self.listSubChannelsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``searchChannels(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func searchChannelsPaginator(
        _ input: SearchChannelsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<SearchChannelsRequest, SearchChannelsResponse> {
        return .init(
            input: input,
            command: self.searchChannels,
            inputKey: \SearchChannelsRequest.nextToken,
            outputKey: \SearchChannelsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``searchChannels(_:logger:)``.
    ///
    /// - Parameters:
    ///   - chimeBearer: The AppInstanceUserArn of the user making the API call.
    ///   - fields: A list of the Field objects in the channel being searched.
    ///   - maxResults: The maximum number of channels that you want returned.
    ///   - logger: Logger used for logging
    @inlinable
    public func searchChannelsPaginator(
        chimeBearer: String? = nil,
        fields: [SearchField],
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<SearchChannelsRequest, SearchChannelsResponse> {
        let input = SearchChannelsRequest(
            chimeBearer: chimeBearer, 
            fields: fields, 
            maxResults: maxResults
        )
        return self.searchChannelsPaginator(input, logger: logger)
    }
}

extension ChimeSDKMessaging.ListChannelBansRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ChimeSDKMessaging.ListChannelBansRequest {
        return .init(
            channelArn: self.channelArn,
            chimeBearer: self.chimeBearer,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension ChimeSDKMessaging.ListChannelFlowsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ChimeSDKMessaging.ListChannelFlowsRequest {
        return .init(
            appInstanceArn: self.appInstanceArn,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension ChimeSDKMessaging.ListChannelMembershipsForAppInstanceUserRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ChimeSDKMessaging.ListChannelMembershipsForAppInstanceUserRequest {
        return .init(
            appInstanceUserArn: self.appInstanceUserArn,
            chimeBearer: self.chimeBearer,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension ChimeSDKMessaging.ListChannelMembershipsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ChimeSDKMessaging.ListChannelMembershipsRequest {
        return .init(
            channelArn: self.channelArn,
            chimeBearer: self.chimeBearer,
            maxResults: self.maxResults,
            nextToken: token,
            subChannelId: self.subChannelId,
            type: self.type
        )
    }
}

extension ChimeSDKMessaging.ListChannelMessagesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ChimeSDKMessaging.ListChannelMessagesRequest {
        return .init(
            channelArn: self.channelArn,
            chimeBearer: self.chimeBearer,
            maxResults: self.maxResults,
            nextToken: token,
            notAfter: self.notAfter,
            notBefore: self.notBefore,
            sortOrder: self.sortOrder,
            subChannelId: self.subChannelId
        )
    }
}

extension ChimeSDKMessaging.ListChannelModeratorsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ChimeSDKMessaging.ListChannelModeratorsRequest {
        return .init(
            channelArn: self.channelArn,
            chimeBearer: self.chimeBearer,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension ChimeSDKMessaging.ListChannelsAssociatedWithChannelFlowRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ChimeSDKMessaging.ListChannelsAssociatedWithChannelFlowRequest {
        return .init(
            channelFlowArn: self.channelFlowArn,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension ChimeSDKMessaging.ListChannelsModeratedByAppInstanceUserRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ChimeSDKMessaging.ListChannelsModeratedByAppInstanceUserRequest {
        return .init(
            appInstanceUserArn: self.appInstanceUserArn,
            chimeBearer: self.chimeBearer,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension ChimeSDKMessaging.ListChannelsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ChimeSDKMessaging.ListChannelsRequest {
        return .init(
            appInstanceArn: self.appInstanceArn,
            chimeBearer: self.chimeBearer,
            maxResults: self.maxResults,
            nextToken: token,
            privacy: self.privacy
        )
    }
}

extension ChimeSDKMessaging.ListSubChannelsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ChimeSDKMessaging.ListSubChannelsRequest {
        return .init(
            channelArn: self.channelArn,
            chimeBearer: self.chimeBearer,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension ChimeSDKMessaging.SearchChannelsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ChimeSDKMessaging.SearchChannelsRequest {
        return .init(
            chimeBearer: self.chimeBearer,
            fields: self.fields,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}
